package main.java.view;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

public class PilotMainView extends JPanel {
	
    //static final variables to change positions id easier
    private static final int GRID1 = 1;
    private static final int GRID2 = 3;
    
    //static final panel title
    private static final String PANEL_TITLE = "PILOT MAIN BOARD";
	
    private HandleView handleView;
    private ButtonsView buttonsView;
    private LightsView lightsView;
    
    public PilotMainView() {
    	//Initialize frame info
    	this.setLayout(new GridLayout(GRID1, GRID2));
    	this.setBackground(Color.white);
    	this.setBorder(BorderFactory.createTitledBorder(PANEL_TITLE));
    	
        //Instantiation of the views
        handleView = new HandleView();
        buttonsView = new ButtonsView();
        lightsView = new LightsView();
        
        //Adding items to the view
        this.add(lightsView);
        this.add(handleView);
        this.add(buttonsView);
	}

    public HandleView getHandleView() {
        return handleView;
    }

    public void setHandleView(HandleView handleView) {
        this.handleView = handleView;
    }

    public ButtonsView getButtonsView() {
        return buttonsView;
    }

    public void setButtonsView(ButtonsView buttonsView) {
        this.buttonsView = buttonsView;
    }
    
    public LightsView getLightsView() {
        return lightsView;
    }

    public void setLightsView(LightsView lightsView) {
        this.lightsView = lightsView;
    }
}
